﻿using System;
using System.Collections.Generic;

namespace Fuse8.DomainFramework.DataAccess.SqlDatabase
{
	/// <summary>
	/// Used for Dynamic SQL Columns and Tables properties configuration
	/// </summary>
	public interface IEntityMappingConfigurator
	{
		/// <summary>
		/// Returns table name by entity type
		/// </summary>
		/// <param name="type">Entity type</param>
		/// <returns></returns>
		string GetEntityTableName(Type type);

		/// <summary>
		/// Returns entity column name by entity type and sql column name
		/// </summary>
		/// <param name="type">Entity type</param>
		/// <param name="column">Sql column name</param>
		/// <returns></returns>
		string GetEntityColumnAlias(Type type, string column);

		/// <summary>
		/// Returns collection of the ignored columns by entity type
		/// </summary>
		/// <param name="type">Entity type</param>
		/// <returns></returns>
		IEnumerable<string> GetIgnoredColumns(Type type);

        /// <summary>
        /// Gest database related name for property
        /// </summary>
        /// <param name="type">Type where specified prorpety situated</param>
        /// <param name="property">Property name</param>
        /// <returns></returns>
	    string GetRelatedPropertyColumnName(Type type, string property);
	}
}